/*******************************************************************************
** Copyright (c) 2004 MaK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
/*******************************************************************************
** $RCSfile: fedAmb13.h,v $ $Revision: 1.2 $ $State: Exp $
*******************************************************************************/

#pragma warning(disable: 4786)
#pragma warning(disable: 4290)

#include "NullFederateAmbassador.hh"
#include <map>
#include <string>

class DtTalkAmbData
{
public:
   std::map<RTI::ObjectClassHandle, std::string> objectClassMap;
   std::map<RTI::ObjectHandle, std::string> objectInstanceMap;
   std::map<RTI::InteractionClassHandle, std::string> interactionClassMap;
};


class MyFederateAmbassador : public NullFederateAmbassador
{
public:

   MyFederateAmbassador(DtTalkAmbData & data);

   virtual ~MyFederateAmbassador() 
     throw (RTI::FederateInternalError);


   ////////////////////////////////
   // Object Management Services //
   ////////////////////////////////

   virtual void discoverObjectInstance (
           RTI::ObjectHandle          theObject,      // supplied C1
           RTI::ObjectClassHandle     theObjectClass, // supplied C1
     const char*                      theObjectName)  // supplied C4  
   throw (
     RTI::CouldNotDiscover,
     RTI::ObjectClassNotKnown,
     RTI::FederateInternalError);

   virtual void reflectAttributeValues (
           RTI::ObjectHandle                 theObject,     // supplied C1
     const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
     const RTI::FedTime&                     theTime,       // supplied C1
     const char                             *theTag,        // supplied C4
           RTI::EventRetractionHandle        theHandle)     // supplied C1
   throw (
     RTI::ObjectNotKnown,
     RTI::AttributeNotKnown,
     RTI::FederateOwnsAttributes,
     RTI::InvalidFederationTime,
     RTI::FederateInternalError);

   virtual void reflectAttributeValues (
           RTI::ObjectHandle                 theObject,     // supplied C1
     const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4
     const char                             *theTag)        // supplied C4
   throw (
     RTI::ObjectNotKnown,
     RTI::AttributeNotKnown,
     RTI::FederateOwnsAttributes,
     RTI::FederateInternalError);

   // 4.6
   virtual void receiveInteraction (
           RTI::InteractionClassHandle       theInteraction, // supplied C1
     const RTI::ParameterHandleValuePairSet& theParameters,  // supplied C4
     const RTI::FedTime&                     theTime,        // supplied C4
     const char                             *theTag,         // supplied C4
           RTI::EventRetractionHandle        theHandle)      // supplied C1
   throw (
     RTI::InteractionClassNotKnown,
     RTI::InteractionParameterNotKnown,
     RTI::InvalidFederationTime,
     RTI::FederateInternalError);

   virtual void receiveInteraction (
           RTI::InteractionClassHandle       theInteraction, // supplied C1
     const RTI::ParameterHandleValuePairSet& theParameters,  // supplied C4
     const char                             *theTag)         // supplied C4
   throw (
     RTI::InteractionClassNotKnown,
     RTI::InteractionParameterNotKnown,
     RTI::FederateInternalError);

   virtual void removeObjectInstance (
           RTI::ObjectHandle          theObject, // supplied C1
     const RTI::FedTime&              theTime,   // supplied C4
     const char                      *theTag,    // supplied C4
           RTI::EventRetractionHandle theHandle) // supplied C1
   throw (
     RTI::ObjectNotKnown,
     RTI::InvalidFederationTime,
     RTI::FederateInternalError);

   virtual void removeObjectInstance (
           RTI::ObjectHandle          theObject, // supplied C1
     const char                      *theTag)    // supplied C4
   throw (
     RTI::ObjectNotKnown,
     RTI::FederateInternalError);


public:
   DtTalkAmbData & myData;
};

